package com.liuyang.second.concurrency.chapter1;

public class SingletonObject3 {
    private static SingletonObject3 instance =null;

    private SingletonObject3() {
    }

    //double check
    public static SingletonObject3 getInstance(){
        if(instance == null){
            synchronized (SingletonObject3.class){
                if(null == instance){
                    instance = new SingletonObject3();
                }
            }
        }
        return instance;
    }
}
